// HSS.Forms.DesignerForm.cs
// ----------------------------------------------------------------------------
// Licensed under the MIT license
// http://www.opensource.org/licenses/mit-license.html
// ----------------------------------------------------------------------------
// HighSpeed-Solutions, LLC
// Copyright (c) 2001-2010
// ----------------------------------------------------------------------------
// File:       DesignerForm.cs
// Author:     HSS\gbanta
// Created:    08/12/2010
// Modified:   12/04/2010
// ----------------------------------------------------------------------------
namespace HSS.Forms
{
	#region Using Directives
	using System;
	using System.Drawing;
	using System.Windows.Forms;
	using System.Windows.Forms.Design;
	#endregion

	/// <summary>
	/// Base class for the Wizard framework
	/// </summary>
	public abstract class DesignerForm : Form
	{
		private bool _firstActivate = true;
		private const int WM_SYSCOMMAND = 0x112;

		/// <summary>
		/// ctor
		/// </summary>
		protected DesignerForm()
		{
		}
		/// <summary>
		/// Initialize the DesignerForm
		/// </summary>
		protected void InitializeForm()
		{
			IUIService service = (IUIService)this.GetService(typeof(IUIService));
			if (service != null)
			{
				Font font = (Font)service.Styles["DialogFont"];
				this.Font = font;
			}
			this.AutoScaleBaseSize = new Size(5, 14);
			base.HelpButton = false;
			base.MinimizeBox = true;
			base.MaximizeBox = false;
			base.ShowIcon = false;
			base.ShowInTaskbar = true;
		}
		/// <summary>
		/// OnActivated
		/// </summary>
		/// <param name="e"></param>
		protected override void OnActivated(EventArgs e)
		{
			base.OnActivated(e);
			if (this._firstActivate)
			{
				this._firstActivate = false;
				this.OnInitialActivated(e);
			}
		}
		/// <summary>
		/// OnInitialActivated
		/// </summary>
		/// <param name="e"></param>
		protected virtual void OnInitialActivated(EventArgs e)
		{
		}
	}
}